using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialStatisticsTools._ModelingSpatialRelationships
{
    /// <summary>
    /// <para>Colocation Analysis</para>
    /// <para>Measures local patterns of spatial association, or colocation, between two categories of point features using the colocation quotient statistic.</para>
    /// <para>使用共置商统计量测量两类点要素之间的空间关联或共置的局部模式。</para>
    /// </summary>    
    [DisplayName("Colocation Analysis")]
    public class ColocationAnalysis : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ColocationAnalysis()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_input_type">
        /// <para>Input Type</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the Input Features of Interest will come from the same dataset with specified categories, different datasets with specified categories, or different datasets that will be treated as their own category (for example, one dataset with all points representing cheetahs and a second dataset in which all points represent gazelles).</para>
        ///   <bulletList>
        ///     <bullet_item>Single dataset—The categories to be analyzed exist in a field in a single dataset.</bullet_item><para/>
        ///     <bullet_item>Two datasets—The categories to be analyzed exist in fields of separate datasets.</bullet_item><para/>
        ///     <bullet_item>Datasets without categories—Two separate datasets representing two categories will be analyzed.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定感兴趣的输入要素是来自具有指定类别的同一数据集、具有指定类别的不同数据集，还是将被视为其自身类别的不同数据集（例如，一个数据集的所有点表示猎豹，另一个数据集的所有点都表示瞪羚）。</para>
        ///   <bulletList>
        ///     <bullet_item>单个数据集 - 要分析的类别存在于单个数据集的字段中。</bullet_item><para/>
        ///     <bullet_item>两个数据集 - 要分析的类别存在于不同数据集的字段中。</bullet_item><para/>
        ///     <bullet_item>不带类别的数据集—将分析表示两个类别的两个独立数据集。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_in_features_of_interest">
        /// <para>Input Features of Interest</para>
        /// <para>The feature class containing points with representative categories.</para>
        /// <para>包含具有代表性类别的点的要素类。</para>
        /// </param>
        /// <param name="_output_features">
        /// <para>Output Features</para>
        /// <para>The output feature class containing all the Input Features of Interest with fields containing the resulting local colocation quotient, symbology bin, and p-values.</para>
        /// <para>包含所有感兴趣的输入要素的输出要素类，其字段包含生成的局部托管商、符号系统图格和 p 值。</para>
        /// </param>
        public ColocationAnalysis(_input_type_value _input_type, object _in_features_of_interest, object _output_features)
        {
            this._input_type = _input_type;
            this._in_features_of_interest = _in_features_of_interest;
            this._output_features = _output_features;
        }
        public override string ToolboxName => "Spatial Statistics Tools";

        public override string ToolName => "Colocation Analysis";

        public override string CallName => "stats.ColocationAnalysis";

        public override List<string> AcceptEnvironments => ["outputCoordinateSystem", "parallelProcessingFactor", "randomGenerator"];

        public override object[] ParameterInfo => [_input_type.GetGPValue(), _in_features_of_interest, _output_features, _field_of_interest, _time_field_of_interest, _category_of_interest, _input_feature_for_comparison, _field_for_comparison, _time_field_for_comparison, _category_for_comparison, _neighborhood_type.GetGPValue(), _number_of_neighbors, _distance_band, _weights_matrix_file, _temporal_relationship_type.GetGPValue(), _time_step_interval, _number_of_permutations, _local_weighting_scheme.GetGPValue(), _output_table];

        /// <summary>
        /// <para>Input Type</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the Input Features of Interest will come from the same dataset with specified categories, different datasets with specified categories, or different datasets that will be treated as their own category (for example, one dataset with all points representing cheetahs and a second dataset in which all points represent gazelles).</para>
        ///   <bulletList>
        ///     <bullet_item>Single dataset—The categories to be analyzed exist in a field in a single dataset.</bullet_item><para/>
        ///     <bullet_item>Two datasets—The categories to be analyzed exist in fields of separate datasets.</bullet_item><para/>
        ///     <bullet_item>Datasets without categories—Two separate datasets representing two categories will be analyzed.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定感兴趣的输入要素是来自具有指定类别的同一数据集、具有指定类别的不同数据集，还是将被视为其自身类别的不同数据集（例如，一个数据集的所有点表示猎豹，另一个数据集的所有点都表示瞪羚）。</para>
        ///   <bulletList>
        ///     <bullet_item>单个数据集 - 要分析的类别存在于单个数据集的字段中。</bullet_item><para/>
        ///     <bullet_item>两个数据集 - 要分析的类别存在于不同数据集的字段中。</bullet_item><para/>
        ///     <bullet_item>不带类别的数据集—将分析表示两个类别的两个独立数据集。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Type")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _input_type_value _input_type { get; set; }

        public enum _input_type_value
        {
            /// <summary>
            /// <para>Single dataset</para>
            /// <para>Single dataset—The categories to be analyzed exist in a field in a single dataset.</para>
            /// <para>单个数据集 - 要分析的类别存在于单个数据集的字段中。</para>
            /// </summary>
            [Description("Single dataset")]
            [GPEnumValue("SINGLE_DATASET")]
            _SINGLE_DATASET,

            /// <summary>
            /// <para>Datasets without categories</para>
            /// <para>Datasets without categories—Two separate datasets representing two categories will be analyzed.</para>
            /// <para>不带类别的数据集—将分析表示两个类别的两个独立数据集。</para>
            /// </summary>
            [Description("Datasets without categories")]
            [GPEnumValue("DATASETS_WITHOUT_CATEGORIES")]
            _DATASETS_WITHOUT_CATEGORIES,

            /// <summary>
            /// <para>Two datasets</para>
            /// <para>Two datasets—The categories to be analyzed exist in fields of separate datasets.</para>
            /// <para>两个数据集 - 要分析的类别存在于不同数据集的字段中。</para>
            /// </summary>
            [Description("Two datasets")]
            [GPEnumValue("TWO_DATASETS")]
            _TWO_DATASETS,

        }

        /// <summary>
        /// <para>Input Features of Interest</para>
        /// <para>The feature class containing points with representative categories.</para>
        /// <para>包含具有代表性类别的点的要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features of Interest")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features_of_interest { get; set; }


        /// <summary>
        /// <para>Output Features</para>
        /// <para>The output feature class containing all the Input Features of Interest with fields containing the resulting local colocation quotient, symbology bin, and p-values.</para>
        /// <para>包含所有感兴趣的输入要素的输出要素类，其字段包含生成的局部托管商、符号系统图格和 p 值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _output_features { get; set; }


        /// <summary>
        /// <para>Field of Interest</para>
        /// <para>The field containing the category or categories to be analyzed.</para>
        /// <para>包含要分析的一个或多个类别的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Field of Interest")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _field_of_interest { get; set; } = null;


        /// <summary>
        /// <para>Time Field of Interest</para>
        /// <para>A date field with an optional time stamp for each feature to analyze points using a space-time window. Features near each other in space and time will be considered neighbors and will be analyzed together.</para>
        /// <para>为每个要素提供可选时间戳的日期字段，用于使用时空窗口分析点。在空间和时间上彼此接近的要素将被视为邻居，并将一起分析。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time Field of Interest")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _time_field_of_interest { get; set; } = null;


        /// <summary>
        /// <para>Category of Interest</para>
        /// <para>The base category for the analysis. The tool will identify, for each Category of Interest value, the degree to which the base category is attracted to or colocated with the Neighboring Category.</para>
        /// <para>分析的基本类别。该工具将识别每个感兴趣类别值的程度，即基本类别被相邻类别吸引或与相邻类别位于同一位置的程度。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Category of Interest")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _category_of_interest { get; set; } = null;


        /// <summary>
        /// <para>Input Neighboring Features</para>
        /// <para>The input feature class containing the points with the categories that will be compared.</para>
        /// <para>包含具有要比较的类别的点的输入要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Neighboring Features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _input_feature_for_comparison { get; set; } = null;


        /// <summary>
        /// <para>Field Containing Neighboring Category</para>
        /// <para>The field from the Input Neighboring Features parameter containing the category to be compared.</para>
        /// <para>输入相邻要素参数中包含要比较的类别的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Field Containing Neighboring Category")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _field_for_comparison { get; set; } = null;


        /// <summary>
        /// <para>Time Field of Neighboring Features</para>
        /// <para>A date field with a time stamp for each feature to analyze your points using a space-time window. Features near each other in space and time will be considered neighbors and will be analyzed together.</para>
        /// <para>一个日期字段，其中包含每个要素的时间戳，用于使用时空窗口分析您的点。在空间和时间上彼此接近的要素将被视为邻居，并将一起分析。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time Field of Neighboring Features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _time_field_for_comparison { get; set; } = null;


        /// <summary>
        /// <para>Neighboring Category</para>
        /// <para>The neighboring category for the analysis. The tool will identify the degree to which the Category of Interest is attracted to or isolated from the Neighboring Category.</para>
        /// <para>分析的相邻类别。该工具将确定感兴趣的类别被相邻类别吸引或隔离的程度。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Neighboring Category")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _category_for_comparison { get; set; } = null;


        /// <summary>
        /// <para>Neighborhood Type</para>
        /// <para><xdoc>
        ///   <para>Specifies how the spatial relationships among features are defined.</para>
        ///   <bulletList>
        ///     <bullet_item>Distance band—Each feature will be analyzed within the context of neighboring features. Neighboring features inside the specified critical distance specified by the Distance Band parameter receive a weight of one and exert influence on computations for the target feature. Neighboring features outside the critical distance receive a weight of zero and have no influence on a target feature's computations.</bullet_item><para/>
        ///     <bullet_item>K nearest neighbors—The closest k features will be included in the analysis as neighbors. The number of neighbors is specified by the Number of Neighbors parameter. This is the default.</bullet_item><para/>
        ///     <bullet_item>Get spatial weights from file—When Single dataset is used as the Input Tpe, spatial relationships will be defined by a specified spatial weights matrix file. The path to the spatial weights file is specified by the Weight Matrix File parameter.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何定义要素之间的空间关系。</para>
        ///   <bulletList>
        ///     <bullet_item>距离波段—将在相邻要素的上下文中分析每个要素。距离带参数指定的指定临界距离内的相邻要素的权重为 1，并对目标要素的计算产生影响。临界距离之外的相邻要素的权重为零，并且对目标要素的计算没有影响。</bullet_item><para/>
        ///     <bullet_item>K 最近邻—最近 k 个要素将作为邻域包含在分析中。邻居数由邻居数参数指定。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>从文件中获取空间权重 - 当将单个数据集用作输入 Tpe 时，空间关系将由指定的空间权重矩阵文件定义。空间权重文件的路径由权重矩阵文件参数指定。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Neighborhood Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _neighborhood_type_value _neighborhood_type { get; set; } = _neighborhood_type_value._K_NEAREST_NEIGHBORS;

        public enum _neighborhood_type_value
        {
            /// <summary>
            /// <para>K nearest neighbors</para>
            /// <para>K nearest neighbors—The closest k features will be included in the analysis as neighbors. The number of neighbors is specified by the Number of Neighbors parameter. This is the default.</para>
            /// <para>K 最近邻—最近 k 个要素将作为邻域包含在分析中。邻居数由邻居数参数指定。这是默认设置。</para>
            /// </summary>
            [Description("K nearest neighbors")]
            [GPEnumValue("K_NEAREST_NEIGHBORS")]
            _K_NEAREST_NEIGHBORS,

            /// <summary>
            /// <para>Distance band</para>
            /// <para>Distance band—Each feature will be analyzed within the context of neighboring features. Neighboring features inside the specified critical distance specified by the Distance Band parameter receive a weight of one and exert influence on computations for the target feature. Neighboring features outside the critical distance receive a weight of zero and have no influence on a target feature's computations.</para>
            /// <para>距离波段—将在相邻要素的上下文中分析每个要素。距离带参数指定的指定临界距离内的相邻要素的权重为 1，并对目标要素的计算产生影响。临界距离之外的相邻要素的权重为零，并且对目标要素的计算没有影响。</para>
            /// </summary>
            [Description("Distance band")]
            [GPEnumValue("DISTANCE_BAND")]
            _DISTANCE_BAND,

            /// <summary>
            /// <para>Get spatial weights from file</para>
            /// <para>Get spatial weights from file—When Single dataset is used as the Input Tpe, spatial relationships will be defined by a specified spatial weights matrix file. The path to the spatial weights file is specified by the Weight Matrix File parameter.</para>
            /// <para>从文件中获取空间权重 - 当将单个数据集用作输入 Tpe 时，空间关系将由指定的空间权重矩阵文件定义。空间权重文件的路径由权重矩阵文件参数指定。</para>
            /// </summary>
            [Description("Get spatial weights from file")]
            [GPEnumValue("GET_SPATIAL_WEIGHTS_FROM_FILE")]
            _GET_SPATIAL_WEIGHTS_FROM_FILE,

        }

        /// <summary>
        /// <para>Number of Neighbors</para>
        /// <para>The number of neighbors around each feature that will be used to test for local relationships between categories. If no value is provided, the default of 8 is used. The provided value must be large enough to detect the relationships between features but small enough to still identify local patterns.</para>
        /// <para>每个要素周围的邻居数，这些邻居将用于测试类别之间的局部关系。如果未提供任何值，则使用默认值 8。提供的值必须足够大，以便检测要素之间的关系，但又要足够小，以便仍能识别局部模式。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Number of Neighbors")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _number_of_neighbors { get; set; } = 8;


        /// <summary>
        /// <para>Distance Band</para>
        /// <para>The neighborhood size is a constant or fixed distance for each feature. All features within this distance will be used to test for local relationships between categories. If no value is provided, the distance used will be the average distance at which each feature has at least eight neighbors.</para>
        /// <para>邻域大小是每个要素的常数或固定距离。此距离内的所有要素都将用于测试类别之间的局部关系。如果未提供值，则使用的距离将为每个要素至少有 8 个相邻要素的平均距离。</para>
        /// <para>单位： Feet | Meters | Kilometers | Miles </para>
        /// </summary>
        [DisplayName("Distance Band")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _distance_band { get; set; } = null;


        /// <summary>
        /// <para>Weight Matrix File</para>
        /// <para>The path to a file containing weights that define spatial, and potentially temporal, relationships among features.</para>
        /// <para>包含权重的文件的路径，这些权重用于定义要素之间的空间关系和潜在的时间关系。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Weight Matrix File")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _weights_matrix_file { get; set; } = null;


        /// <summary>
        /// <para>Temporal Relationship Type</para>
        /// <para><xdoc>
        ///   <para>Specifies how temporal relationships among features will be defined.</para>
        ///   <bulletList>
        ///     <bullet_item>Before—The time window will extend back in time for each of the Input Features of Interest values. Neighboring features must have a date/time stamp that occurs before the date/time stamp of the feature of interest to be included in the analysis. This is the default.</bullet_item><para/>
        ///     <bullet_item>After—The time window will extend forward in time for each of the Input Features of Interest values. Neighboring features must have a date/time stamp that occurs after the date/time stamp of the feature of interest to be included in the analysis.</bullet_item><para/>
        ///     <bullet_item>Span—The time window will extend both back and forward in time for each of the Input Features of Interest values. Neighboring features that have a date/time stamp that occurs within the Time Step Interval value either before or after the date/time stamp of the feature of interest will be included in the analysis. For example, if the Time Step Interval parameter is set to 1 week, the window will look 1 week before and 1 week after the target feature.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何定义要素之间的时态关系。</para>
        ///   <bulletList>
        ///     <bullet_item>之前 - 对于每个感兴趣输入要素值，时间窗口将向后延伸。相邻要素的日期/时间戳必须出现在要包含在分析中的感兴趣要素的日期/时间戳之前。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>之后 - 对于每个感兴趣输入要素值，时间窗口将在时间上向前延伸。相邻要素必须具有日期/时间戳，该日期/时间戳出现在要包含在分析中的感兴趣要素的日期/时间戳之后。</bullet_item><para/>
        ///     <bullet_item>跨度—对于每个感兴趣的输入要素值，时间窗口将在时间上向后和向前延伸。在感兴趣要素的日期/时间戳之前或之后的时间步长间隔值内出现的日期/时间戳的相邻要素将包括在分析中。例如，如果时间步长间隔参数设置为 1 周，则窗口将显示目标要素之前 1 周和之后 1 周。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Temporal Relationship Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _temporal_relationship_type_value _temporal_relationship_type { get; set; } = _temporal_relationship_type_value._BEFORE;

        public enum _temporal_relationship_type_value
        {
            /// <summary>
            /// <para>Before</para>
            /// <para>Before—The time window will extend back in time for each of the Input Features of Interest values. Neighboring features must have a date/time stamp that occurs before the date/time stamp of the feature of interest to be included in the analysis. This is the default.</para>
            /// <para>之前 - 对于每个感兴趣输入要素值，时间窗口将向后延伸。相邻要素的日期/时间戳必须出现在要包含在分析中的感兴趣要素的日期/时间戳之前。这是默认设置。</para>
            /// </summary>
            [Description("Before")]
            [GPEnumValue("BEFORE")]
            _BEFORE,

            /// <summary>
            /// <para>After</para>
            /// <para>After—The time window will extend forward in time for each of the Input Features of Interest values. Neighboring features must have a date/time stamp that occurs after the date/time stamp of the feature of interest to be included in the analysis.</para>
            /// <para>之后 - 对于每个感兴趣输入要素值，时间窗口将在时间上向前延伸。相邻要素必须具有日期/时间戳，该日期/时间戳出现在要包含在分析中的感兴趣要素的日期/时间戳之后。</para>
            /// </summary>
            [Description("After")]
            [GPEnumValue("AFTER")]
            _AFTER,

            /// <summary>
            /// <para>Span</para>
            /// <para>Span—The time window will extend both back and forward in time for each of the Input Features of Interest values. Neighboring features that have a date/time stamp that occurs within the Time Step Interval value either before or after the date/time stamp of the feature of interest will be included in the analysis. For example, if the Time Step Interval parameter is set to 1 week, the window will look 1 week before and 1 week after the target feature.</para>
            /// <para>跨度—对于每个感兴趣的输入要素值，时间窗口将在时间上向后和向前延伸。在感兴趣要素的日期/时间戳之前或之后的时间步长间隔值内出现的日期/时间戳的相邻要素将包括在分析中。例如，如果时间步长间隔参数设置为 1 周，则窗口将显示目标要素之前 1 周和之后 1 周。</para>
            /// </summary>
            [Description("Span")]
            [GPEnumValue("SPAN")]
            _SPAN,

        }

        /// <summary>
        /// <para>Time Step Interval</para>
        /// <para>An integer and unit of measurement representing the number of time units composing the time window.</para>
        /// <para>一个整数和度量单位，表示构成时间窗口的时间单位数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time Step Interval")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _time_step_interval { get; set; } = null;


        /// <summary>
        /// <para>Number of Permutations</para>
        /// <para><xdoc>
        ///   <para>The number of permutations that will be used to create a reference distribution. Choosing the number of permutations is a balance between precision and increased processing time. Choose your preference of speed versus precision. More robust and precise results take longer to calculate.</para>
        ///   <bulletList>
        ///     <bullet_item>99—The analysis will use 99 permutations. With 99 permutations, the smallest possible pseudo p-value is 0.02 and all other pseudo p-values will be multiples of this value. This is the default.</bullet_item><para/>
        ///     <bullet_item>199—The analysis will use 199 permutations. With 199 permutations, the smallest possible pseudo p-value is 0.01 and all other pseudo p-values will be even multiples of this value.</bullet_item><para/>
        ///     <bullet_item>499—The analysis will use 499 permutations. With 499 permutations, the smallest possible pseudo p-value is 0.004 and all other pseudo p-values will be even multiples of this value.</bullet_item><para/>
        ///     <bullet_item>999—The analysis will use 999 permutations. With 999 permutations, the smallest possible pseudo p-value is 0.002 and all other pseudo p-values will be even multiples of this value.</bullet_item><para/>
        ///     <bullet_item>9999—The analysis will use 9,999 permutations. With 9,999 permutations, the smallest possible pseudo p-value is 0.0002 and all other pseudo p-values will be even multiples of this value.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将用于创建参考分布的排列数。选择排列数量是在精度和增加的处理时间之间取得平衡。选择您对速度与精度的偏好。更可靠、更精确的结果需要更长的时间来计算。</para>
        ///   <bulletList>
        ///     <bullet_item>99—分析将使用 99 种排列。对于 99 种排列，最小的可能伪 p 值为 0.02，所有其他伪 p 值都将是该值的倍数。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>199—分析将使用 199 种排列。对于 199 个排列，最小的可能伪 p 值为 0.01，所有其他伪 p 值将是该值的偶数倍。</bullet_item><para/>
        ///     <bullet_item>499—分析将使用 499 排列。对于 499 个排列，最小的可能伪 p 值为 0.004，所有其他伪 p 值将是该值的偶数倍。</bullet_item><para/>
        ///     <bullet_item>999—分析将使用 999 排列。对于 999 个排列，最小的可能伪 p 值为 0.002，所有其他伪 p 值将是该值的偶数倍。</bullet_item><para/>
        ///     <bullet_item>9999—分析将使用 9,999 个排列。对于 9,999 个排列，最小的可能伪 p 值为 0.0002，所有其他伪 p 值将是该值的偶数倍。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Number of Permutations")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _number_of_permutations { get; set; } = 99;


        /// <summary>
        /// <para>Local Weighting Scheme</para>
        /// <para><xdoc>
        ///   <para>Specifies the kernel type that will be used to provide the spatial weighting. The kernel defines how each feature is related to other features within its neighborhood.</para>
        ///   <bulletList>
        ///     <bullet_item>Bisquare—Features will be weighted based on the distance to the farthest neighbor or the edge of the distance band, and a weight of 0 will be assigned to any feature outside the neighborhood specified.</bullet_item><para/>
        ///     <bullet_item>Gaussian—Features will be weighted based on the distance to the farthest neighbor or the edge of the distance band but drop off more quickly than the Bisquare option. A weight of 0 will be assigned to any feature outside the neighborhood specified. This is the default.</bullet_item><para/>
        ///     <bullet_item>None—No weighting scheme will be applied, and all features within the neighborhood will be given a weight of 1 and contribute equally. All features outside the neighborhood will be given a weight of 0.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将用于提供空间权重的内核类型。内核定义每个特征如何与其邻域中的其他特征相关联。</para>
        ///   <bulletList>
        ///     <bullet_item>双正方形—将根据到最远邻域的距离或距离带的边对要素进行加权，并将权重 0 分配给指定邻域之外的任何要素。</bullet_item><para/>
        ///     <bullet_item>高斯 - 要素将根据到最远邻居的距离或距离带的边缘进行加权，但下降速度比双方选项快。权重 0 将分配给指定邻域之外的任何要素。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>无—将不应用加权方案，邻域内的所有要素的权重均为 1，并且贡献相等。邻域外的所有要素的权重均为 0。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Local Weighting Scheme")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _local_weighting_scheme_value _local_weighting_scheme { get; set; } = _local_weighting_scheme_value._GAUSSIAN;

        public enum _local_weighting_scheme_value
        {
            /// <summary>
            /// <para>Bisquare</para>
            /// <para>Bisquare—Features will be weighted based on the distance to the farthest neighbor or the edge of the distance band, and a weight of 0 will be assigned to any feature outside the neighborhood specified.</para>
            /// <para>双正方形—将根据到最远邻域的距离或距离带的边对要素进行加权，并将权重 0 分配给指定邻域之外的任何要素。</para>
            /// </summary>
            [Description("Bisquare")]
            [GPEnumValue("BISQUARE")]
            _BISQUARE,

            /// <summary>
            /// <para>Gaussian</para>
            /// <para>Gaussian—Features will be weighted based on the distance to the farthest neighbor or the edge of the distance band but drop off more quickly than the Bisquare option. A weight of 0 will be assigned to any feature outside the neighborhood specified. This is the default.</para>
            /// <para>高斯 - 要素将根据到最远邻居的距离或距离带的边缘进行加权，但下降速度比双方选项快。权重 0 将分配给指定邻域之外的任何要素。这是默认设置。</para>
            /// </summary>
            [Description("Gaussian")]
            [GPEnumValue("GAUSSIAN")]
            _GAUSSIAN,

            /// <summary>
            /// <para>None</para>
            /// <para>None—No weighting scheme will be applied, and all features within the neighborhood will be given a weight of 1 and contribute equally. All features outside the neighborhood will be given a weight of 0.</para>
            /// <para>无—将不应用加权方案，邻域内的所有要素的权重均为 1，并且贡献相等。邻域外的所有要素的权重均为 0。</para>
            /// </summary>
            [Description("None")]
            [GPEnumValue("NONE")]
            _NONE,

        }

        /// <summary>
        /// <para>Output Table for Global Relationships</para>
        /// <para><xdoc>
        ///   <para>A table that includes the global colocation quotients between all the categories in the Field of Interest parameter and all the categories in the Field Containing Neighboring Category parameter. This table can help you determine the local categories to analyze.</para>
        ///   <para>If Datasets without categories is used as the Input Type parameter value, global colocation quotients will be calculated for each dataset and between each dataset.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>包含感兴趣字段参数中所有类别和包含相邻类别的字段参数中所有类别之间的全局托管商的表。此表可帮助您确定要分析的本地类别。</para>
        ///   <para>如果使用不带类别的数据集作为输入类型参数值，则将计算每个数据集以及每个数据集之间的全局托管商。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Table for Global Relationships")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _output_table { get; set; } = null;


        public ColocationAnalysis SetEnv(object outputCoordinateSystem = null, object parallelProcessingFactor = null, object randomGenerator = null)
        {
            base.SetEnv(outputCoordinateSystem: outputCoordinateSystem, parallelProcessingFactor: parallelProcessingFactor, randomGenerator: randomGenerator);
            return this;
        }

    }

}